﻿package com.tudou.home.utils
{

    dynamic public class TudouURL extends Object
    {
        public var url:String;

        public function TudouURL(param1:String)
        {
            var reg:RegExp;
            var a:Array;
            var i:int;
            var temp:Array;
            var url:* = param1;
            this.url = url;
            try
            {
                reg = /[^\s&?=\/]+=[^\s&?=\/]+""[^\s&?=\/]+=[^\s&?=\/]+/g;
                a = url.match(reg);
                if (a)
                {
                    i;
                    while (i < a.length)
                    {
                        
                        temp = a[i].split("=");
                        this[temp[0]] = temp[1];
                        i = (i + 1);
                    }
                }
            }
            catch (e:Error)
            {
                trace(e);
            }
            return;
        }// end function

    }
}
